<h1>Editar Metodo de Pago</h1>

<% form_for(@paymethod) do |f| %>
  <%= f.error_messages %>

 <img width="55" height="55" src="/images/visa.png" align="middle"/>Tarjeta de Credito
  <%= f.radio_button :name, "tarjeta", :checked =>false, :onclick => "Element.hide('paypal');Element.show('tarjeta');"%>
  
  <img width="65" height="30" src="/images/paypal.png" align="middle" />PayPal
  <%= f.radio_button :name, "paypal", :checked =>false, :onclick => "Element.hide('tarjeta');Element.show('paypal');"%>
  <br> 
  	  <br> Limite 			 	 <%= f.text_field :limit, :size => 20 %><br><br>
  
  <div id="tarjeta" >
    <legend>Datos de la Tarjeta</legend><br>
      Nombre 			 	 <%= f.text_field :namecc, :size => 20 %><br> 
      Numero    			 <%= f.text_field :numbercc, :size => 20 %><br> 
      Fecha de Expiracion    <% CalendarDateSelect.format=(:iso_date)%>
							 <%= calendar_date_select_includes %> 
							 <%= f.calendar_date_select :expdatecc, :year_range => 0.years.from_now.year..20.years.from_now.year %><br>
	  Codigo    			 <%= f.text_field :codecc, :size => 20 %><br>
	  Tipo					 <%= f.radio_button :typecc, :visa %>Visa <%= f.radio_button :typecc, :mastercard %>MasterCard<br>


	  
  </div>
  <div id="paypal"  >

    <legend>Datos PayPal</legend><br>
      Usuario   <%= f.text_field :useracc, :size => 20 %><br> 

  </div>

  <%= f.hidden_field :user_idf, :value => session[:user_id] %>

  <p>
    <%= f.submit 'Modificar' %>
  </p>
<% end %>

<%= link_to 'Mostrar', @paymethod %> |
<%= link_to 'Regresar', paymethods_path %>